<div id="blog-con" class="content">
    <div id="blog-wrap">
        <table width="100%">
            <tr>
                <td>
                    <div class="left-con">
                        <div class="blog-separator" style="height:120px;"></div>
                        <div class="community-img">
                            <a href="<?php echo base_url(); ?>blog/retrieve_article/web"><img src="<?php echo base_url(); ?>assets/images/web-logo.png" title="Komunitas Web"/></a>
                        </div>
                        <div class="community-img">
                            <a href="<?php echo base_url(); ?>blog/retrieve_article/mobile"><img src="<?php echo base_url(); ?>assets/images/mobile-logo.png" title="Komunitas Mobile"/></a>
                        </div>
                        <div class="community-img">
                            <a href="<?php echo base_url(); ?>blog/retrieve_article/analyst"><img src="<?php echo base_url(); ?>assets/images/analyst-logo.png" title="Komunitas Analyst"/></a>
                        </div>
                        <div class="community-img">
                            <a href="<?php echo base_url(); ?>blog/retrieve_article/event"><img src="<?php echo base_url(); ?>assets/images/event-logo.png" title="Event"/></a>
                        </div>
                        <div class="community-img">
                            <a href="<?php echo base_url(); ?>blog/retrieve_article/appreciation"><img src="<?php echo base_url(); ?>assets/images/apprecation-logo.png" title="Appreciation"/></a>
                        </div>
                    </div>
                </td>
                <td>
                    <div class="blog-center-con"> <!--style="background-color: #FFCC00;">!-->
                        <div class="blog-title">
                            <img src="<?php echo base_url(); ?>assets/images/<?php 
                                    if($category=="web"){
                                        echo "webblog-title.png";
                                    }else if($category=="mobile"){
                                        echo "mobileblog-title.png";
                                    }else if($category=="analyst"){
                                        echo "analystblog-title.png";
                                    }else if($category=="event"){
                                        echo "event-title.png";
                                    }else if($category=="appreciation"){
                                        echo "appreciation-title.png";
                                    }else if($category=="search"){
                                        echo "search-title.png";
                                    }
                                 ?>"/>
                        </div>
                        <div class="blog-form-search">
                            <form name="search" method="POST" action="<?php echo base_url(); ?>blog/search_article" >
                                <input class="blog-textsearch" type="text" name="search"/>
                                <input class="blog-search" type="Submit" name="Submit" value="Search"/>
                            </form>
                            <?php
                            if ($this->session->userdata('user')):
                                ?>
                                <a href="<?php echo base_url(); ?>blog/display_form/add">
                                    <label class="blog-admin-add">
                                        Add Article
                                    </label></a>
                                <?php
                            endif;
                            ?>
                        </div>
                        <?php
                        if ($articles != false) {
                            foreach ($articles as $rows) {
                                ?>
                                <div class="blog-content">
                                    <div class="blog-content-thumb"> 
                                        <a href="<?php echo base_url(); ?>/assets/images/<?php echo $rows->url_image; ?>" rel="bookmark" title="<?php echo $rows->judul; ?>'s photo">
                                            <img src="<?php echo base_url(); ?>assets/images/<?php echo $rows->url_image; ?>" alt="inkubatorIT-photo" class="blog-img" id="image1" /></a>
                                    </div> 
                                    <span class="blog-info"> <em><?php echo date("l, d F Y, h:i:s", strtotime($rows->timestamp)); ?></em> 
                                        <?php
                                        if ($this->session->userdata('user')):
                                            ?>
                                            <label>( </label>
                                            <a href="<?php echo base_url(); ?>blog/display_form/edit/<?php echo $rows->idartikel; ?>"><label>edit</label></a>
                                            <label> | </label>
                                            <a href="<?php echo base_url(); ?>blog/display_form/delete/<?php echo $rows->idartikel; ?>" onclick="return confirmDelete(this)"><label>delete</label></a>
                                            <label> )</label>
                                            <?php
                                        endif;
                                        ?>
                                    </span>
                                    <div class="blog-content-title">
                                        <h1><a title="<?php echo $rows->judul; ?>" href="<?php echo base_url(); ?>blog/retrieve_read_article/<?php echo $rows->idartikel; ?>" rel="bookmark"><?php echo $rows->judul; ?></a></h1>
                                    </div> 
                                    <span class="blog-info">Written by 
                                        <a href="" title="<?php echo $rows->penulis; ?>" rel="writer"><?php echo $rows->penulis; ?></a>
                                        <br/>
                                        <label>Category : </label><a href="#" title="<?php echo $rows->nama; ?>" rel="category tag"><?php echo $rows->nama; ?></a>
                                    </span>
                                    <div class="blog-text-excerpt"><p><?php echo substr($rows->konten, 0, 150); ?> [...]</p>
                                    </div>
                                    <div class="blog-middlespacer"></div>
                                </div>
                                <?php }?>
                            <div class="read-blog-pagination"> <?php echo $this->pagination->create_links(); ?> </div>
                            <br/>
                            <?php
                        }else {
                            ?> <label id="blog-label-sorry">Sorry content is not available</label>
                            <?php
                        }
                        ?>
                    </div>
                </td>
            </tr>
        </table>
    </div>
</div>